package vip.hamlin.dnspod.utils;

import java.util.regex.Pattern;

/**
 * Created by SunShao on 2016/6/1.
 */
public class ValidateUtils {
    private static String ipRegex = "([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}";
    private static Pattern ipRegexPattern = Pattern.compile(ipRegex);

    public static boolean isIp(String ipAddress) {
        return ipRegexPattern.matcher(ipAddress).matches();
    }
}
